package com.ww.yaodao.util;

public enum ResultEnums {

    OK(200, "请求成功"),
    CREATED(201, "创建成功"),
    DELETED(204, "删除成功"),
    UPDATED(205, "修改成功"),
    BAD_REQUEST(400, "请求的地址不存在或者包含不支持的参数"),
    UNAUTHORIZED(401,"未授权"),
    FORBIDDEN(403,"被禁止访问"),
    NOT_FOUND(404,"请求的资源不存在"),
    UNPROCESABLE_ENTITY(422,"[POST/PUT/PATCH] 当创建一个对象时，发生一个验证错误"),
    INTERNAL_SERVER_ERROR(500,"内部错误"),
    INSET_ERROR(1000,"添加内容不允许为空"),
    REGISTER_ERROR(1000,"添加内容不允许为空"),
    SELECT_ERROR(1002,"查询内容为空"),
    UPDATE_ERROR(1005,"修改失败"),
    EXCEL_ERROR(1001,"excel上传失败"),
    DELETE_ERROR(1004,"删除失败"),
    QUERY_ERROR(1003,"查询为空"),
    EXCEL_OK(2000,"excel上传成功");
    private int status;
    private String msg;

    ResultEnums(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}